<?
Module::Init('system:structure');
BDS::Init();
$filter = array();
$filter['block_id'] = $params['block_id'];
$result = BDSSections::GetList($filter);
$result = Tree($result, 'id', 'section_id', 'sections', true);
?>